<?php
    if(!isset($showitem) && isset($_GET['showitem']))
        $showitem = $_GET['showitem'];
    
    $deurl = 'changelang.php?lang=de&retpage='.$_SERVER['PHP_SELF'].'&showitem='.$showitem;
    $enurl = 'changelang.php?lang=en&retpage='.$_SERVER['PHP_SELF'].'&showitem='.$showitem;
?>
<div class="logo">
    <a href="index.php">
        <img src="img/logo.png" alt="myweddingbook.ch" />
    </a>
</div>
<?php if(isset($_SESSION['id'])): ?>
    <div class="logoutlink">
        <a href="logout.php" >
            <?php echo $logout; ?>
        </a>
    </div>
<?php endif; ?>
<div class="langpicker">
    <?php if($lang == 'en'): ?>
        <a href="<?php echo $deurl ?>" >
            <img src="img/flag_de.png" alt="DE" />
        </a>
        <img src="img/flag_en.png" alt="EN" /> 
    <?php else: ?>
        <img src="img/flag_de.png" alt="DE" />
        <a href="<?php echo $enurl ?>" >
            <img src="img/flag_en.png" alt="EN" />
        </a>
    <?php endif; ?> 
</div>
